package com.jtcoding.chat.dao.chat;

import com.jtcoding.chat.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Optional;

/**
 * @author jason.tang
 * @create 2018-12-27 13:01
 * @description
 */
@Mapper
public interface UserDao {

    List<User> getUserList();

    Optional<User> getUserByLoginIDAndPwd(User user);

    int addUser(User user);

    int updateUser(User user);

    Optional<User> getUserByUserNum(Integer userNum);

    int updateUserIcon(User user);

    int updateUsername(@Param("userNum") Integer userNum, @Param("username") String username);

    List<User> getUserByNums(Integer... friendNum);

    Optional<User> getUserByNewInfo(User user);

    int updateUserStatus(User user);

    int updateSignature(User user);

    List<User> searchUser(String keyword);

    int updateUserQRCode(User user);
}
